{if $step!=3 }
	{if $error}
		<div class="star">
		{foreach item=err from=$error}
		<p>{$err}</p>
		{/foreach}
		</div>
	{/if}
	<div class="header_naranja">
	<p><center>{$comunicate_vendedor_01}</center>
	</p>	
	</div>	
	<div class="header_naranja_h2">
		<p>{$comunicate_vendedor_03}</p>
	</div>
	<form id="itemForm" name="itemForm" action="" method="post" accept-charset="utf-8">
	<table cellspacing="3" cellpadding="3" width="100%">
	<tbody>
	<tr>
	     <td class="align_left"><span class="star">*</span> {$smarty.const.LA_FULLNAME}:</td>
	     <td valign="top" class="align_rigth" >
	     	<input type="text" value="{$name}" style="width: 250px;" maxlength="100" size="30" class="txt" id="contacto_vendedor_name"/>
	     </td>
	</tr>
	
	<tr>
	     <td class="align_left"><span class="star">*</span> {$smarty.const.LA_MAILADDRESS}:</td>
	     <td valign="top" class="align_rigth">
	     	<input type="text" value="{$email}" style="width: 250px;" size="30" class="txt" id="contacto_vendedor_email"/>
	     </td>
	</tr>
	
	<tr>
	     <td class="align_left"><span class="star">*</span> {$smarty.const.EF_USR_TELEFONO_2}:</td>
	     <td valign="top" class="align_rigth">
	     	<input type="text" value="{$phone_car}" style="width: 60px;" size="4" id="contacto_vendedor_name_tel_car"/>
	     	&nbsp;     
	     	<input type="text" value="{$phone_num}" style="width: 175px;" size="21" id="contacto_vendedor_name_tel_num"/> 
	     </td>
	</tr>
	
	<tr>
	     <td class="align_left">{$smarty.const.LA_MESSAGE_COMMENT}:</td>
	     <td valign="top" class="align_rigth">
	     	<textarea style="width: 250px;" id="contacto_vendedor_comments" class="usr_mas_info" rows="2" cols="34">{$comments}</textarea> 
	     </td>
	</tr>     
	   	   	
	{*<tr>
	     <td class="align_left">{$smarty.const.LA_IMG_VER}:</td>
	     <td valign="top" ><img alt="" src="val_img.php"/></td>
	</tr>
	    
	<tr>
		<td class="align_left"><span class="star">*</span> {$smarty.const.LA_IMG_VER2}:</td>
	    <td valign="top" class="align_rigth"><input style="width: 250px;" type="text" size="30" id="contacto_vendedor_code" class="txt"/></td>
	</tr>*}
	{*<tr>	
	   	<td  class="align_left" colspan="2" valign="top">
	   			<input type="checkbox" value="651" id="83" name="e_83[]"/>
	   			Acepto que me envien  información de Mercadovial.com
	    </td>
	</tr>*}
	<tr>
	    <td align="center" colspan="2">
	    	<input type="hidden" id="contacto_vendedor_user_id" value="{$user_id}" />
	    	<input type="hidden" id="contacto_vendedor_ad_id" value="{$ad_id}" />
	    	<input type="hidden" id="promotion_id" value="{$promotion_id}" />
	    	<input type="hidden" id="contacto_vendedor_mainType" value="{$mainType}" />
	    	<input type="hidden" id="enc" value="&#153;" name="enc" />
	     	<p><input type="button" value="Ver Datos" id="contacto_vendedor_ver_datos_button"  name="submit" class="button" onclick="javascript:return sendDataContactoVendedor();"/></p>
	    </td>
	</tr>
	</tbody>
	</table>
	</form>

	
{else}
<script type="text/javascript">
{literal}
<!--
jQuery(document).ready(function(){

	 {/literal}
		 {if $step==3 }
			 var url = '{$urlencoded}';
			 if(url != '')	window.open(url);
		 {/if}
	{literal}
	 var inner = $('#inner_contacto_vendedor').height();
	 var extraSpace = 35;
	 $("#popup_contacto_vendedor").css("height",Math.abs(inner+extraSpace)+"px");
//	 /******SEND EMAILS**********/

	 $.ajax({
		    type: "POST",
		    url: "formulario_contacto.php",
		    data: {'name': '{/literal}{$name}{literal}', 'email': '{/literal}{$email}{literal}', 
		           'phone': '{/literal}{$phone}{literal}', 'comments': '{/literal}{$comments}{literal}', 
		           'user_id': '{/literal}{$user_id}{literal}','step': '3', 'ad_id': '{/literal}{$ad_id}{literal}', 
		           'vendor_email': '{/literal}{$useremail}{literal}', 'vendor_name': '{/literal}{$username}{literal}',
				   'vendor_ad_title': '{/literal}{$ad_title}{literal}', 'vendor_phone': '{/literal}{$vendor_phone}{literal}',
				   'vendor_radio': '{/literal}{$vendor_radio}{literal}', 'mainType': '{/literal}{$mainType}{literal}', 'promotion_id': '{/literal}{$promotion_id}{literal}'
		           },
		    success: function(info) {
		    },
		    error: function (XMLHttpRequest, textStatus, errorThrown) {
		        alert("No fue posible enviar los emails, por favor contactese con el equipo de MercadoVial.com a info@mercadovial.com");
		    }
		});

	 

	
});
//-->
{/literal}
</script>
<table  cellspacing="1" cellpadding="1" width="100%" class="box">
<thead>
	<tr>
		<th colspan="2" class="header_box">{$datos_vendedor_01}</th>
	</tr>
</thead>
<tbody>
	<tr>
			<td valign="top" class="align_left small_font" ><b>{$smarty.const.VENDOR_NAME}:</b></td>
		   	<td valign="top" class="align_rigth small_font"><b>{$username}</b></td>
	</tr>
	<tr>
			<td valign="top" class="align_left small_font" ><b>{$smarty.const.ADD_USER_EMAIL}:</b></td>
		   	<td valign="top" class="align_rigth small_font">{$useremail}</td>
	</tr>
	{foreach item=e from=$user_extra}
	{if $e.value}	
	
		{if $e.description}
			<tr><td colspan="2">
		   		<b>{$e.description}</b><hr style="color:black;" width="50%" align="left">
			</td></tr>
		{/if}
		
		{if $e.question!=$smarty.const.EF_MOSTRAR_DIRECCION}
		<tr>
			<td valign="top" class="align_left small_font" ><b>{$e.question}:</b></td>
		   	<td valign="top" class="align_rigth small_font">
		   	{$e.value}
		   	</td>
		</tr>
		{/if}
	
	{/if}	
	{/foreach}
</tbody>
</table>
<div class="header_naranja">
	{$llama_ahora}
</div>
<div>{$llama_ahora_mensaje}</div>
{if $urlencoded}
<div style="font-weight: bold;">{$smarty.const.EF_NO_OPEN_LINK}&nbsp;<a href="{$urlencoded}" target="new" >{$smarty.const.EF_HERE}</a></div>
{/if}
<!--  div id="div_loading" style="display: none;">
<table cellspacing="3" cellpadding="3" width="100%">
	<tbody>
		<tr>
			<td style="text-align: right;" ><h3>Enviando E-mails con la información...</h3></td>
			<td><img src="layout_images/new/ajax_loading_48.gif" alt="loading..." /></td>				          
		</tr>
	</tbody>
</table>
</div-->

{/if}
